Integrand size = 21, antiderivative size = 79 \[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {a \text {arctanh}(\sin (c+d x))}{b^2 d}-\frac {\sqrt {a^2+b^2} \text {arctanh}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{b^2 d}+\frac {\sec (c+d x)}{b d} \]
-a*arctanh(sin(d*x+c))/b^2/d+sec(d*x+c)/b/d-arctanh(cos(d*x+c)*(b-a*tan(d* x+c))/(a^2+b^2)^(1/2))*(a^2+b^2)^(1/2)/b^2/d
Time = 0.53 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.38 \[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {2 \sqrt {a^2+b^2} \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )+a \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+b \sec (c+d x)}{b^2 d} \]
(2*Sqrt[a^2 + b^2]*ArcTanh[(-b + a*Tan[(c + d*x)/2])/Sqrt[a^2 + b^2]] + a* (Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + b*Sec[c + d*x])/(b^2*d)
Time = 0.50 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3989, 3042, 3967, 3042, 3988, 219, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (c+d x)^3}{a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 3989 |
\(\displaystyle \frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{b^2}-\frac {\int \sec (c+d x) (a-b \tan (c+d x))dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{b^2}-\frac {\int \sec (c+d x) (a-b \tan (c+d x))dx}{b^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{b^2}-\frac {a \int \sec (c+d x)dx-\frac {b \sec (c+d x)}{d}}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{b^2}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {b \sec (c+d x)}{d}}{b^2}\) |
\(\Big \downarrow \) 3988 |
\(\displaystyle -\frac {\left (a^2+b^2\right ) \int \frac {1}{a^2+b^2-\cos ^2(c+d x) (b-a \tan (c+d x))^2}d(\cos (c+d x) (b-a \tan (c+d x)))}{b^2 d}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {b \sec (c+d x)}{d}}{b^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {b \sec (c+d x)}{d}}{b^2}-\frac {\sqrt {a^2+b^2} \text {arctanh}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{b^2 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {\sqrt {a^2+b^2} \text {arctanh}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {\frac {a \text {arctanh}(\sin (c+d x))}{d}-\frac {b \sec (c+d x)}{d}}{b^2}\) |
-((Sqrt[a^2 + b^2]*ArcTanh[(Cos[c + d*x]*(b - a*Tan[c + d*x]))/Sqrt[a^2 + b^2]])/(b^2*d)) - ((a*ArcTanh[Sin[c + d*x]])/d - (b*Sec[c + d*x])/d)/b^2
3.6.50.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbo l] :> Simp[-f^(-1) Subst[Int[1/(a^2 + b^2 - x^2), x], x, (b - a*Tan[e + f *x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_ Symbol] :> Simp[-(b^2)^(-1) Int[Sec[e + f*x]^(m - 2)*(a - b*Tan[e + f*x]) , x], x] + Simp[(a^2 + b^2)/b^2 Int[Sec[e + f*x]^(m - 2)/(a + b*Tan[e + f *x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IGtQ[(m - 1) /2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 4.09 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.63
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (-a^{2}-b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{2} \sqrt {a^{2}+b^{2}}}-\frac {1}{b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{2}}+\frac {1}{b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{2}}}{d}\) | \(129\) |
default | \(\frac {-\frac {2 \left (-a^{2}-b^{2}\right ) \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{2} \sqrt {a^{2}+b^{2}}}-\frac {1}{b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{2}}+\frac {1}{b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{2}}}{d}\) | \(129\) |
risch | \(\frac {2 \,{\mathrm e}^{i \left (d x +c \right )}}{d b \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d \,b^{2}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,b^{2}}+\frac {\sqrt {a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{d \,b^{2}}-\frac {\sqrt {a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{d \,b^{2}}\) | \(167\) |
1/d*(-2/b^2*(-a^2-b^2)/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tan(1/2*d*x+1/2*c) -2*b)/(a^2+b^2)^(1/2))-1/b/(tan(1/2*d*x+1/2*c)-1)+a/b^2*ln(tan(1/2*d*x+1/2 *c)-1)+1/b/(tan(1/2*d*x+1/2*c)+1)-a/b^2*ln(tan(1/2*d*x+1/2*c)+1))
Leaf count of result is larger than twice the leaf count of optimal. 191 vs. \(2 (77) = 154\).
Time = 0.27 (sec) , antiderivative size = 191, normalized size of antiderivative = 2.42 \[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {a \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - a \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) - \sqrt {a^{2} + b^{2}} \cos \left (d x + c\right ) \log \left (-\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) - 2 \, b}{2 \, b^{2} d \cos \left (d x + c\right )} \]
-1/2*(a*cos(d*x + c)*log(sin(d*x + c) + 1) - a*cos(d*x + c)*log(-sin(d*x + c) + 1) - sqrt(a^2 + b^2)*cos(d*x + c)*log(-(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 - 2*a^2 - b^2 + 2*sqrt(a^2 + b^2)*(b*cos( d*x + c) - a*sin(d*x + c)))/(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2) *cos(d*x + c)^2 + b^2)) - 2*b)/(b^2*d*cos(d*x + c))
\[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\int \frac {\sec ^{3}{\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 163 vs. \(2 (77) = 154\).
Time = 0.47 (sec) , antiderivative size = 163, normalized size of antiderivative = 2.06 \[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {\frac {a \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{2}} - \frac {a \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{2}} + \frac {\sqrt {a^{2} + b^{2}} \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{b^{2}} - \frac {2}{b - \frac {b \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}}{d} \]
-(a*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/b^2 - a*log(sin(d*x + c)/(cos (d*x + c) + 1) - 1)/b^2 + sqrt(a^2 + b^2)*log((b - a*sin(d*x + c)/(cos(d*x + c) + 1) + sqrt(a^2 + b^2))/(b - a*sin(d*x + c)/(cos(d*x + c) + 1) - sqr t(a^2 + b^2)))/b^2 - 2/(b - b*sin(d*x + c)^2/(cos(d*x + c) + 1)^2))/d
Time = 0.40 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.72 \[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{2}} - \frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{2}} + \frac {\sqrt {a^{2} + b^{2}} \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{b^{2}} + \frac {2}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} b}}{d} \]
-(a*log(abs(tan(1/2*d*x + 1/2*c) + 1))/b^2 - a*log(abs(tan(1/2*d*x + 1/2*c ) - 1))/b^2 + sqrt(a^2 + b^2)*log(abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b - 2*s qrt(a^2 + b^2))/abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b + 2*sqrt(a^2 + b^2)))/b ^2 + 2/((tan(1/2*d*x + 1/2*c)^2 - 1)*b))/d
Time = 4.31 (sec) , antiderivative size = 310, normalized size of antiderivative = 3.92 \[ \int \frac {\sec ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {64\,a^2\,\sqrt {a^2+b^2}}{64\,a^2\,b+\frac {64\,a^4}{b}+128\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+128\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {128\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}}{64\,a^2+\frac {64\,a^4}{b^2}+\frac {128\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}+128\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {64\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}}{64\,a^4+128\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3\,b+64\,a^2\,b^2+128\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^3}\right )\,\sqrt {a^2+b^2}}{b^2\,d}-\frac {2\,a\,\mathrm {atanh}\left (\frac {64\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^2+\frac {64\,a^4}{b^2}}+\frac {64\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^4+64\,a^2\,b^2}\right )}{b^2\,d}-\frac {2}{b\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
(2*atanh((64*a^2*(a^2 + b^2)^(1/2))/(64*a^2*b + (64*a^4)/b + 128*a^3*tan(c /2 + (d*x)/2) + 128*a*b^2*tan(c/2 + (d*x)/2)) + (128*a*tan(c/2 + (d*x)/2)* (a^2 + b^2)^(1/2))/(64*a^2 + (64*a^4)/b^2 + (128*a^3*tan(c/2 + (d*x)/2))/b + 128*a*b*tan(c/2 + (d*x)/2)) + (64*a^3*tan(c/2 + (d*x)/2)*(a^2 + b^2)^(1 /2))/(64*a^4 + 64*a^2*b^2 + 128*a*b^3*tan(c/2 + (d*x)/2) + 128*a^3*b*tan(c /2 + (d*x)/2)))*(a^2 + b^2)^(1/2))/(b^2*d) - (2*a*atanh((64*a^2*tan(c/2 + (d*x)/2))/(64*a^2 + (64*a^4)/b^2) + (64*a^4*tan(c/2 + (d*x)/2))/(64*a^4 + 64*a^2*b^2)))/(b^2*d) - 2/(b*d*(tan(c/2 + (d*x)/2)^2 - 1))